
		Imports Acceso_a_Datos.Datos
		Namespace BO
		Partial Public Class tEstudios
# Region "tTitulos"
	private mlistatTitulos As New List (Of tTitulos)
Public Property ListatTitulos As System.Collections.Generic.List(Of tTitulos)
Get
dim mtTitulos As New tTitulos
mlistatTitulos =mtTitulos.TraerFiltradoListOf("IdEstudio",Me.IdEstudio)
Return mlistatTitulos
End Get
Set
RemoveAllListatTitulos()
If Not (Value Is Nothing) Then
Dim otTitulos As tTitulos
	For Each otTitulos in Value
		AddListatTitulos(otTitulos)
	Next
End If
End Set
End Property


		
		
	   Public Sub AddListatTitulos(newtTitulos As tTitulos)
	If (mlistatTitulos Is Nothing) Then
		mlistatTitulos = new System.Collections.Generic.List(Of tTitulos)
	End If
	If Not mlistatTitulos.Contains(newtTitulos) Then
		mlistatTitulos.Add(newtTitulos)
		newtTitulos.tEstudios = Me
	End If
End Sub

	   
	   
	   
	   Public Sub RemoveListatTitulos(oldtTitulos As tTitulos)
	If (mlistatTitulos.Contains(oldtTitulos)) Then
		mlistatTitulos.Remove(oldtTitulos)
		oldtTitulos.tEstudios = Nothing
	End If
End Sub
	
			
			Public Sub RemoveAllListatTitulos()
	If Not (mlistatTitulos Is Nothing)
		Dim tmp_listatTitulos As System.Collections.ArrayList = new System.Collections.ArrayList()
		Dim oldtTitulos As tTitulos
		For Each oldtTitulos in mlistatTitulos
			tmp_listatTitulos.Add(oldtTitulos)
		Next
	mlistatTitulos.Clear()
	For Each oldtTitulos in tmp_listatTitulos
		oldtTitulos = Nothing
	Next
	tmp_listatTitulos.Clear()
	End If
End Sub

# End Region


# Region "Lecturas que devuelven listas"
Public Function TraerTodosListOf() As List(Of tEstudios)
            Dim dtDatos As DataTable
            Dim listatEstudios As New List(Of tEstudios)
            Dim param As [String]
            param = (Me.mNombreEntidad + "_SelectAll")
            dtDatos = Me.ServidorDatos.TraerDataTable(param)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtEstudios As New tEstudios
				mtEstudios.IdEstudio = CType(dr.Item("IdEstudio"),Integer)
				mtEstudios.Traer_objeto()
            	listatEstudios.Add( mtEstudios)
    		Next dr
Return listatEstudios
End Function

Public Function TraerFiltradoListOf(ByVal Filtro As [String], ByVal Args As Object) As List(Of tEstudios)
            Dim dtDatos As DataTable
            Dim param As [String]
            Dim listatEstudios As New List(Of tEstudios)
            param = (Me.mNombreEntidad + "_Tx")
            param = (param + Filtro.ToString)
            dtDatos = Me.ServidorDatos.TraerDataTable(param, Args)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtEstudios As New tEstudios
				mtEstudios.IdEstudio = CType(dr.Item("IdEstudio"),Integer)
				mtEstudios.Traer_objeto()
            	listatEstudios.Add( mtEstudios)
    		Next dr
Return listatEstudios
End Function

Public Function TraerFiltradoLikeListOf(ByVal Filtro As [String], ByVal Args As Object) As List(Of tEstudios)
            Dim dtDatos As DataTable
            Dim param As [String]
            Dim listatEstudios As New List(Of tEstudios)
            param = (Me.mNombreEntidad + "_TxLike")
            param = (param + Filtro.ToString)
            dtDatos = Me.ServidorDatos.TraerDataTable(param, Args)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtEstudios As New tEstudios
				mtEstudios.IdEstudio = CType(dr.Item("IdEstudio"),Integer)
				mtEstudios.Traer_objeto()
            	listatEstudios.Add( mtEstudios)
    		Next dr
Return listatEstudios
End Function
# End Region

End Class
End Namespace
